package com.study.spark.scala.chapter06

object Scala09_Object_Abstract_3 {
  def main(args: Array[String]): Unit = {
    // TODO 面向对象 - 抽象
    val child = new Child
    println(child.name)
    println(child.age)
  }
  abstract class User {
    val name : String
    val age : Int =10

  }

  class Child extends User{
    // var声明的属性不能被override 编译无法通过
    /*override可有可无*/ override val name : String="zhangsan"
    override val age : Int =20

  }

}


